LotusScript Doc

Class: LSAPhoneItem

Represents a phone number consisting of a key for the access and a phone number. This class can be used together with the class LSANamedList and implemets the AnyItem interface.

Version:
1.2.3, 27.JUL.2000
History:
RGR27.JUL.2000Property CountriesWithoutAreaCode added



Property Summary
Public Property Set AreaCode As String
Public Property Get AreaCode As String
Public Property Set CountriesWithoutAreaCode As Variant
Public Property Get CountriesWithoutAreaCode As Variant
Public Property Set CountryCode As String
Public Property Get CountryCode As String
Public Property Set Delimiter As String
Public Property Get Delimiter As String
Public Property Set DisplayFormat As String
Public Property Get DisplayFormat As String
Public Property Set Extension As String
Public Property Get Extension As String
Public Property Get Formatted As String
Public Property Set Key As String
Public Property Get Key As String
Public Property Set NotAllowedChars As Variant
Public Property Get NotAllowedChars As Variant
Public Property Set PhoneNumber As String
Public Property Get PhoneNumber As String

Method Summary
Sub clear ()
Function compareTo (CompItem As LSAPhoneItem) As Integer
Sub Delete ()
Sub explode (SerializedObj As String)
Function hasAttributeChanged (attrName As String) As Integer
Function hasChanged () As Integer
Function implode () As String
Function isEmptyInstance () As Integer
Sub New (NewKey As String, NewCountryCode As String, NewAreaCode As String, NewPhoneNumber As String, NewExtension As String)
Sub validate ()

Property Detail

Public Property Set Key AsString

Sets the description of the phone number; e.g. "Private" for your home phone number

Errors:
ErrDelimiterInField
Summmary Top

Public Property Get Key AsString

Summmary Top

Public Property Set CountryCode AsString

Sets the country code of a phone number. Leading "+" or zeros will be trimmed away.

Summmary Top

Public Property Get CountryCode AsString

Summmary Top

Public Property Set AreaCode AsString

Sets the country code of a phone number. Leading "+" or zeros will be trimmed away.

Summmary Top

Public Property Get AreaCode AsString

Summmary Top

Public Property Set PhoneNumber AsString

The basic number of a phone number; leading zeros will be removed.

Summmary Top

Public Property Get PhoneNumber AsString

Summmary Top

Public Property Set Extension AsString

The basic number of a phone number; leading zeros will be removed.

Summmary Top

Public Property Get Extension AsString

Summmary Top

Public Property Set CountriesWithoutAreaCode AsVariant

List of country codes which doesn't have to be followed by an area code in validation

Summmary Top

Public Property Get CountriesWithoutAreaCode AsVariant

Summmary Top

Public Property Set Delimiter AsString

When the object is imploded to a serial data string this character will be used as seperator. If the programmer doesn't set a delimiter a default value will be delivered by the class.

Summmary Top

Public Property Get Delimiter AsString

Summmary Top

Public Property Set NotAllowedChars AsVariant

These characters are not allowed to be use in the key property

Summmary Top

Public Property Get NotAllowedChars AsVariant

Summmary Top

Public Property Set DisplayFormat AsString

The display format is a rule for formatting the object data when the property 'Formatted' is used. This is a string based on the formula language of the VExpand command to format e-mail addresses.The values of the constants PHI_DEFAULT_KEY_NAME, PHI_DEFAULT_AREA_CODE_NAME, PHI_DEFAULT_COUNTRY_CODE_NAME, DefaultPhoneNumber and DefaultExtension have to be used to define the format.

Summmary Top

Public Property Get DisplayFormat AsString

Summmary Top

Public Property Get Formatted AsString

Formats the object's data in a user defined way

Summmary Top
Method Detail

New

Public Sub New(NewKey As String,NewCountryCode As String,NewAreaCode As String,NewPhoneNumber As String,NewExtension As String)
This is the constructor of the object. It will set the properties Key, CountryCode, AreaCode, PhoneNumber and Extension with the parameter values. Default values for the properties Delimiter, NotAllowedChars and DisplayFormat are set.

Parameters:
NewKeyStringKey to acces this phone number in a list
NewCountryCodeStringcountry code of the phone number
NewAreaCodeStringarea code of the phone number
NewPhoneNumberStringnumber
NewExtensionStringextension of the phone number
Summmary Top

Delete

Public Sub Delete
Summmary Top

implode

Public Function implode As String
This method writes the data of the object to a serialized data string. The string is of the form (Me.Delimiter = "~"): ~~~~~~~.

Returns:
Stringserial data string representing the object
Summmary Top

explode

Public Sub explode(SerializedObj As String)
Transforms a string build by the implode method in its components and sets the attribute of the object. Old values are reseted to the new values.

Parameters:
serializedObjStringString of the format as delivered by the implode method
Errors:
ErrDataDoesntCorrespondToObject
Summmary Top

validate

Public Sub validate
The "Key" and "Phone number" or "Extension" property needn't to be empty. If there is an country code there needs to be area code, too.

Errors:
ErrPhoneTypeEmpty
ErrAreaCodeEmpty
ErrLineCodeEmpty
Summmary Top

clear

Public Sub clear
Clears the values of the phone item object. After the usage of clear the method IsEmptyInstance will deliver true as return value.

Summmary Top

isEmptyInstance

Public Function isEmptyInstance As Integer
The method checks if all attributes are empty strings.

Returns:
Booleantrue, if all attribute are empty strings
Summmary Top

compareTo

Public Function compareTo(CompItem As LSAPhoneItem) As Integer
This method compares the properties Key, AreaCode CountryCode, PhoneNumber and Extension of the PhoneItem object.

Returns:
Booleantrue, if all attribute are equal
Summmary Top

hasAttributeChanged

Public Function hasAttributeChanged(attrName As String) As Integer
Checks the attribute with the name attrName heen changed

Parameters:
attrNameStringthe name of the attribute to check
Returns:
booleantrue, if the attribute has changed
Summmary Top

hasChanged

Public Function hasChanged As Integer
Checks if one of the objects attributes has been changed

Summmary Top

TopLotusScript Doc
© Lotus Professional Services
generated on : 05-Apr-01 8:40:00 AM